/*! \file bcm56960_a0_fp_ing_qual_db.c
 *
 * IFP qualifier configuration DB initialization function
 * for Tomahawk(56960_A0).
 */
/*
 * Copyright: (c) 2018 Broadcom. All Rights Reserved. "Broadcom" refers to 
 * Broadcom Limited and/or its subsidiaries.
 * 
 * Broadcom Switch Software License
 * 
 * This license governs the use of the accompanying Broadcom software. Your 
 * use of the software indicates your acceptance of the terms and conditions 
 * of this license. If you do not agree to the terms and conditions of this 
 * license, do not use the software.
 * 1. Definitions
 *    "Licensor" means any person or entity that distributes its Work.
 *    "Software" means the original work of authorship made available under 
 *    this license.
 *    "Work" means the Software and any additions to or derivative works of 
 *    the Software that are made available under this license.
 *    The terms "reproduce," "reproduction," "derivative works," and 
 *    "distribution" have the meaning as provided under U.S. copyright law.
 *    Works, including the Software, are "made available" under this license 
 *    by including in or with the Work either (a) a copyright notice 
 *    referencing the applicability of this license to the Work, or (b) a copy 
 *    of this license.
 * 2. Grant of Copyright License
 *    Subject to the terms and conditions of this license, each Licensor 
 *    grants to you a perpetual, worldwide, non-exclusive, and royalty-free 
 *    copyright license to reproduce, prepare derivative works of, publicly 
 *    display, publicly perform, sublicense and distribute its Work and any 
 *    resulting derivative works in any form.
 * 3. Grant of Patent License
 *    Subject to the terms and conditions of this license, each Licensor 
 *    grants to you a perpetual, worldwide, non-exclusive, and royalty-free 
 *    patent license to make, have made, use, offer to sell, sell, import, and 
 *    otherwise transfer its Work, in whole or in part. This patent license 
 *    applies only to the patent claims licensable by Licensor that would be 
 *    infringed by Licensor's Work (or portion thereof) individually and 
 *    excluding any combinations with any other materials or technology.
 *    If you institute patent litigation against any Licensor (including a 
 *    cross-claim or counterclaim in a lawsuit) to enforce any patents that 
 *    you allege are infringed by any Work, then your patent license from such 
 *    Licensor to the Work shall terminate as of the date such litigation is 
 *    filed.
 * 4. Redistribution
 *    You may reproduce or distribute the Work only if (a) you do so under 
 *    this License, (b) you include a complete copy of this License with your 
 *    distribution, and (c) you retain without modification any copyright, 
 *    patent, trademark, or attribution notices that are present in the Work.
 * 5. Derivative Works
 *    You may specify that additional or different terms apply to the use, 
 *    reproduction, and distribution of your derivative works of the Work 
 *    ("Your Terms") only if (a) Your Terms provide that the limitations of 
 *    Section 7 apply to your derivative works, and (b) you identify the 
 *    specific derivative works that are subject to Your Terms. 
 *    Notwithstanding Your Terms, this license (including the redistribution 
 *    requirements in Section 4) will continue to apply to the Work itself.
 * 6. Trademarks
 *    This license does not grant any rights to use any Licensor's or its 
 *    affiliates' names, logos, or trademarks, except as necessary to 
 *    reproduce the notices described in this license.
 * 7. Limitations
 *    Platform. The Work and any derivative works thereof may only be used, or 
 *    intended for use, with a Broadcom switch integrated circuit.
 *    No Reverse Engineering. You will not use the Work to disassemble, 
 *    reverse engineer, decompile, or attempt to ascertain the underlying 
 *    technology of a Broadcom switch integrated circuit.
 * 8. Termination
 *    If you violate any term of this license, then your rights under this 
 *    license (including the license grants of Sections 2 and 3) will 
 *    terminate immediately.
 * 9. Disclaimer of Warranty
 *    THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY 
 *    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF 
 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR 
 *    NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER 
 *    THIS LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN 
 *    IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU.
 * 10. Limitation of Liability
 *    EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL 
 *    THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE 
 *    SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, 
 *    INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF 
 *    OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK 
 *    (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, 
 *    LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER 
 *    COMMERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF 
 *    THE POSSIBILITY OF SUCH DAMAGES.
 */

#include <shr/shr_error.h>
#include <shr/shr_debug.h>
#include <bcmfp/bcmfp_internal.h>
#include <bcmfp/chip/bcm56960_a0_fp.h>
#include <bcmfp/bcmfp_keygen_api.h>

#define BSL_LOG_MODULE BSL_LS_BCMFP_COMMON

int
bcmfp_bcm56960_a0_ingress_qual_cfg_db_init(int unit,
                                           bcmfp_stage_t *stage)
{
    bcmfp_qual_flags_bmp_t qual_flags;
    bcmfp_keygen_qual_cfg_info_db_t *db = NULL;
    BCMFP_KEYGEN_QUAL_CFG_DECL;

    SHR_FUNC_ENTER(unit);

    SHR_NULL_CHECK(stage, SHR_E_PARAM);

    if (stage->flags & BCMFP_STAGE_KEY_TYPE_PRESEL) {
        if (stage->flags & BCMFP_STAGE_ENTRY_TYPE_HASH) {
            SHR_IF_ERR_EXIT(
                bcmfp_bcm56960_a0_em_presel_qual_cfg_db_init(unit, stage));
            BCMFP_ALLOC(stage->kgn_qual_cfg_info_db,
                              sizeof(bcmfp_keygen_qual_cfg_info_db_t),
                              "EM qualifiers");
        } else {
            SHR_IF_ERR_EXIT(
                bcmfp_bcm56960_a0_ingress_presel_qual_cfg_db_init(unit, stage));
            BCMFP_ALLOC(stage->kgn_qual_cfg_info_db,
                              sizeof(bcmfp_keygen_qual_cfg_info_db_t),
                              "IFP qualifiers");
        }
    }

    if (NULL == stage->kgn_qual_cfg_info_db) {
        return (SHR_E_MEMORY);
    }
    db = stage->kgn_qual_cfg_info_db;
    sal_memset(&qual_flags, 0, sizeof(bcmfp_qual_flags_bmp_t));

    /* UDF Qualifiers. */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 8, 256, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK7, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 8, 272, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK6, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 9, 288, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK5, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 9, 304, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK4, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 10, 320, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK3, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 10, 336, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK2, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 8, 128, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 9, 144, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF1_CHUNK0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 5, 160, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK7, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 5, 176, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK6, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 6, 192, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK5, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 6, 208, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK4, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 7, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK3, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 7, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK2, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 6, 96, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 7, 112, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF2_CHUNK0, qual_flags);

    /* Packet Fields*/
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 25, 400, 12);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_OUTER_VLAN_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 4, 32, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 5, 20, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_OUTER_VLAN_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 25, 412, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_OUTER_VLAN_CFI, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 25, 413, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_OUTER_VLAN_PRIORITY, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 26, 416, 12);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INNER_VLAN_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 3, 24, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 4, 16, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INNER_VLAN_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 26, 428, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INNER_VLAN_CFI, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 26, 429, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INNER_VLAN_PRIORITY, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 2, 64, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 30, 480, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_MAC, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 3, 96, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 31, 496, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_MAC, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 11, 352, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_IP4, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 15, 480, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_IP4, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 11, 352, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E32, 12, 384, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_IP6_LOWER, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 13, 416, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E32, 14, 448, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_IP6_UPPER, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 15, 480, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E32, 16, 512, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_IP6_LOWER, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 17, 544, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E32, 18, 576, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_IP6_UPPER, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 29, 464, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ETHERTYPE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 28, 448, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L4SRC_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 27, 432, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L4DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 4, 128, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MIM_ISID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 4, 128, 24);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NVGRE_VSID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 24);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_VNID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 24);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_VNID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 4, 128, 24);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_VNID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_VNID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_VNID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 24, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_FLAGS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_FLAGS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 4, 152, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_FLAGS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_FLAGS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 88, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_FLAGS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 24);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_24, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 24);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_24, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_24, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_24, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 24, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_8, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_8, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_8, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 88, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLAN_RSVD_8, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ETAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ETAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ETAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ETAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_CNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_CNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_CNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_CNTAG, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 12, 20);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 44, 20);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 44, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 76, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_TTL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_TTL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_TTL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_TTL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 9, 3);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_EXP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 41, 3);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_EXP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 41, 3);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_EXP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 73, 3);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_EXP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 8, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_BOS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 40, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_BOS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 40, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_BOS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 72, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FWD_LABEL_BOS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_CTRL_WORD, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_CTRL_WORD, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_CTRL_WORD, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_CTRL_WORD, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 20);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP6_FLOW_LABEL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 20);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP6_FLOW_LABEL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP6_FLOW_LABEL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP6_FLOW_LABEL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 13, 104, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TTL_FN, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_TTL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 12, 96, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TOS_FN, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_TOS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 14, 112, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_PROTOCOL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 2, 8, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 3, 12, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TCP_FN, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_TCP_CONTROL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 16, 256, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_EM_GROUP_CLASS_ID_0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 16, 264, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_EM_GROUP_CLASS_ID_1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 16, 128, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_FIRST_EH_PROTO, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 15, 120, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_SECOND_EH_PROTO, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 17, 136, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_FIRST_EH_SUBCODE, qual_flags);

    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 28, 112, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_HG_OPCODE, qual_flags);
    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 18, 36, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_FLAGS_MF, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 18, 37, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_FLAGS_DF, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 19, 38, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_FRAG, qual_flags);

    /*Packet Types*/
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 20, 41, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_HIGIG_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 7, 15, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_HIGIGLOOKUP_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 7, 14, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VISIBILITY_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 13, 54, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DOSATTACK_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 1, 0, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_D, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L4_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 1, 16, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_C, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L4_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 8, 17, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L4_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 20, 40, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MIRROR_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 0, 0, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NAT_SRC_REALM_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 8, 16, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NON_FRAGMENT_FIRST_FRAGMENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 1, 16, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_C, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NON_FRAGMENT_FIRST_FRAGMENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 0, 0, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_D, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NON_FRAGMENT_FIRST_FRAGMENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 5, 10, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_ICMP_ERROR_PKT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 5, 11, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_REPLICATION_PKT, qual_flags);

    /*Table HIT/Lookup Status bits*/
    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 11, 46, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 12, 48, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DST_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 12, 50, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_HOST_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 12, 51, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DST_HOST_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 13, 52, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DST_LPM_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 13, 53, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2STATION_MOVE, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 12, 49, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2CACHE_HIT, qual_flags);

    /* not supported for EM */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 11, 47, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_STATIC, qual_flags);

    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 13, 55, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_TUNNEL_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 10, 40, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VXLT_LOOKUP_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 14, 56, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLSENTRY_FIRSTLOOKUP_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 14, 57, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLSENTRY_SECONDLOOKUP_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 17, 35, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MYSTATIONTCAM_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 14, 58, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_BOS_TERMINATED, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 16, 33, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DEST_IP_LOCAL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 17, 35, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_ROUTABLE_PKT, qual_flags);

    /*Class Ids from different Tables*/
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SYSTEM_PORT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_INTF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);

    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 13, 208, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_C, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 12, 192, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_D, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_C, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_D, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_C, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_D, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 13, 216, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_C, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 12, 200, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_D, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FP_VLAN_CLASS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 15, 248, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_VLAN_GROUPID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 14, 232, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_VLAN_GROUPID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 15, 240, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E16, 14, 224, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_A, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_EXT_CTRL_SEL_CLASSID_B, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PORT_FP_ING_KEYSELECT_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 15, 240, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 14, 224, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 9, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 8, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 9, 36, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_A, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 8, 32, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_B, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_UDF_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 216, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 200, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 216, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 200, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3SRC_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 13, 208, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 12, 192, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 7, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 6, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 7, 28, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_C, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 3);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 6, 24, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_CLASSID_D, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3DEST_CLASS, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 5, 46, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PRESEL_CLASS, qual_flags);

    /* Ingress/Egress Objects */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 10, 43, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FWD_VLAN_VALID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 11, 44, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INGRESS_STP_STATE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 10, 20, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP_VALID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 10, 21, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP_VALID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 10, 168, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 7, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 10, 160, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 7, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 10, 184, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 7, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_A, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 11, 176, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 6, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_B, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 10, 160, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 7, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 11, 176, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 6, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_B, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 10, 160, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 7, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_A, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 11, 176, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 3, 6, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_B, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_SRC_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 17, 272, 12);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FWD_VLAN_ID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 2, 16, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 29, 116, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VRF, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 17, 272, 12);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VRF, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 1, 8, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 0, 0, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(2, BCMFP_KEYGEN_EXT_SECTION_L1E2, 1, 2, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VPN, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 17, 274, 14);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VPN, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 18, 288, 13);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_IIF, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 0, 0, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INPORT, qual_flags);

    /*Miscellaneous*/
    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 27, 108, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INT_PRI, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 26, 52, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_COLOR, qual_flags);
    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 27, 55, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_RAL_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 27, 54, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_GAL_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 28, 56, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_CW_VALID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 9, 18, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NAT_INT_CN, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 15, 30, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MACADDR_NORMALIZE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 15, 31, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IPADDR_NORMALIZE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 22, 44, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_INNER_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 22, 45, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_OUTER_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 23, 46, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_TRANSLATED_INNER_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 23, 47, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_VLAN_TRANSLATED_OUTER_PRESENT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 11, 352, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E32, 12, 384, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(2, BCMFP_KEYGEN_EXT_SECTION_L1E32, 13, 416, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(3, BCMFP_KEYGEN_EXT_SECTION_L1E32, 14, 448, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(4, BCMFP_KEYGEN_EXT_SECTION_L1E32, 15, 480, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(5, BCMFP_KEYGEN_EXT_SECTION_L1E32, 16, 512, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(6, BCMFP_KEYGEN_EXT_SECTION_L1E32, 17, 544, 32);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(7, BCMFP_KEYGEN_EXT_SECTION_L1E32, 18, 576, 32);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_BYTES_AFTER_L2HEADER, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 29, 58, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_IP_CHECKSUM_VALID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 0, 0, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_BFD_DISCRIMINATOR, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E32, 1, 32, 32);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_BFD_DISCRIMINATOR, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 2, 32, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 3, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_B, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_BFD_DISCRIMINATOR, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 4, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 5, 80, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_A, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_BFD_DISCRIMINATOR, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 0, 0, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_D, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PKT_LENGTH, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 1, 16, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_AUX_TAG_C, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PKT_LENGTH, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 23, 368, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 24, 384, 16);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_RANGE_CHECKID_BMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 26, 104, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_MPLS_FORWARDING_LABEL_ACTION, qual_flags);

    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 11, 88, 6);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_PKT_RES, qual_flags);
    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 10, 84, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_LOOPBACK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 10, 80, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_LOOPBACK_TYPE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 10, 80, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_TUNNEL_TYPE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 1, 4, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E2, 4, 8, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L3_TYPE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 21, 42, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_L2_FORMAT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 25, 50, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INNER_TPID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E2, 24, 48, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_OUTER_TPID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 15, 60, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_FWD_TYPE, qual_flags);

    /* Class Qualifiers */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 17, 68, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_L4SRC_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 16, 64, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_L4DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 19, 76, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_IP_PROTOCOL, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 18, 72, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_ETHERTYPE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 13, 104, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TTL_FN, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TTL0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 13, 104, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TTL_FN, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TTL1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 12, 96, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TOS_FN, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TOS0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E8, 12, 96, 8);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TOS_FN, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TOS1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 2, 8, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 3, 12, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TCP_FN, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TCP_CONTROL0, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E4, 2, 8, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E4, 3, 12, 4);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_TCP_FN, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_TCP_CONTROL1, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 21, 336, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 22, 352, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(2, BCMFP_KEYGEN_EXT_SECTION_L1E4, 20, 80, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_SRC_IP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_L1E16, 19, 304, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_L1E16, 20, 320, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(2, BCMFP_KEYGEN_EXT_SECTION_L1E4, 21, 84, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_C_DST_IP, qual_flags);

    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_PMUX);
    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
    /* Post Mux Qualifers */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_DROP, 0, 159, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DROP_PKT, qual_flags);

    /* NAT Qualifiers */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_NAT_NEEDED, 1, 158, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NAT_NEEDED, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_NAT_DST_REALMID, 2, 156, 2);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_NAT_DST_REALM_ID, qual_flags);

    /* Exact Match Class Id  and HIT status Qualifiers. */
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_EM_FIRST_LOOKUP_CLASSID_BITS_0_3, 8, 120, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (1, BCMFP_KEYGEN_EXT_SECTION_EM_FIRST_LOOKUP_CLASSID_BITS_4_7, 9, 124, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (2, BCMFP_KEYGEN_EXT_SECTION_EM_FIRST_LOOKUP_CLASSID_BITS_8_11, 10, 128, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT
        (unit, db, BCMFP_QUAL_EM_FIRST_LOOKUP_CLASSID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_EM_SECOND_LOOKUP_CLASSID_BITS_0_3, 5, 132, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (1, BCMFP_KEYGEN_EXT_SECTION_EM_SECOND_LOOKUP_CLASSID_BITS_4_7, 6, 136, 4);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (2, BCMFP_KEYGEN_EXT_SECTION_EM_SECOND_LOOKUP_CLASSID_BITS_8_11, 7, 140, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT
        (unit, db, BCMFP_QUAL_EM_SECOND_LOOKUP_CLASSID, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_EM_FIRST_LOOKUP_HIT, 3, 154, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT
        (unit, db, BCMFP_QUAL_EM_FIRST_LOOKUP_HIT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_EM_SECOND_LOOKUP_HIT, 3, 156, 1);
    BCMFP_KEYGEN_QUAL_CFG_INSERT
        (unit, db, BCMFP_QUAL_EM_SECOND_LOOKUP_HIT, qual_flags);

    /* Destination Port Object(PORT/LAG/VP/VPLAG) -
     * Any other Mode than SINGLE.
     */
    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_PMUX);
    SHR_BITSET(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_SINGLE);
    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 56, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD
        (BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT
        (unit, db, BCMFP_QUAL_DST_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 72, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD
        (1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 10);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 10);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 15);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_NHOP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 15);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_NHOP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_OVERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_OVERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_UNDERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_UNDERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L3_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L3_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 11);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L2_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 64, 16);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 11);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L2_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 48, 11);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 4, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_IPBM_PRESENT, 0);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_INPORTS, qual_flags);

    /* Destination Port Object(PORT/LAG/VP/VPLAG) - SINGLE Wide Mode */
    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_SINGLE);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 96, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 112, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_MODULE, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 88, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 104, 8);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_PORT, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 88, 10);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 104, 10);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 4);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 88, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 104, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP_TRUNK, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 88, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 152, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 104, 14);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINERS_MSB, 0, 153, 1);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 5);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_VP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(1, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 14, 88, 15);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_NHOP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 13, 104, 15);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 9);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_NHOP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 12, 88, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_OVERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 11, 104, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 7);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_OVERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 12, 88, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_UNDERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 11, 104, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 8);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_UNDERLAY_ECMP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 12, 88, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L3_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 11, 104, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 10);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L3_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_0, 12, 88, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_0, 11);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L2_MC_GROUP, qual_flags);

    BCMFP_KEYGEN_QUAL_CFG_INIT(unit);
    BCMFP_KEYGEN_QUAL_CFG_OFFSET_ADD(0, BCMFP_KEYGEN_EXT_SECTION_SRC_DST_CONTAINER_1, 11, 104, 16);
    BCMFP_KEYGEN_QUAL_CFG_CTRL_SEL_ADD(BCMFP_KEYGEN_EXT_CTRL_SEL_SRC_DST_1, 11);
    BCMFP_KEYGEN_QUAL_CFG_INSERT(unit, db, BCMFP_QUAL_DST_L2_MC_GROUP, qual_flags);

    SHR_BITCLR(qual_flags.w, BCMFP_KEYGEN_QUAL_FLAGS_NOT_IN_EM);
exit:
    SHR_FUNC_EXIT();
}
